#include <iostream>
#include <exception>
#include <stdexcept>
#include <string>

int main(int argc, char const *argv[])
{
	try{
		std::string str = "hello world";
		std::cout << str.at(10) << std::endl;
		std::cout << str.at(11) << std::endl;
	}catch(std::out_of_range e){
		std::cout << e.what() << std::endl;
	}catch(std::exception e){
		std::cout << e.what() << std::endl;
	}
	return 0;
}
